package com.iretailer.report.mapper;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iretailer.report.base.SuperMapper;
import com.iretailer.report.model.CompanyMalls;
import com.iretailer.report.model.Malls;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Auther: xjw
 * @Date: 2019/1/21 13:04
 * @Description:
 */
public interface MallsMapper extends SuperMapper<Malls> {

    /**
     * enabled 为 null 则查询全部 1 为打开，-1为关闭
     * userId 用户的 id
     */
    List<Malls> selectMallsByUserId_enabled(@Param("userId") String userId, @Param("enabled") Integer enabled);

    List<Malls> selectMallsByBusinesstimeId_enabled(@Param("businesstimeId") String businesstimeId, @Param("enabled") Integer enabled);

    List<Malls> selectMallsByTagTypeId_enabled(@Param("tagTypeId") String tagTypeId, @Param("enabled") Integer enabled);

    IPage<CompanyMalls> selectPageUserMalls(Page page, @Param("ew") QueryWrapper queryWrapper);

    IPage<CompanyMalls> selectPageMalls(Page page, @Param("ew") QueryWrapper<Malls> queryWrapper);

    List<Malls> sendMallBySendregularyId_enabled(@Param("sendregularyId") String sendregularyId, @Param("enabled") Integer enabled);

    CompanyMalls selectCompanyMalls(@Param("ew") Wrapper wrapper);

    List<Malls> selectMallsByCoefficientId_enabled(@Param("coefficientId")String coefficientId, Integer enabled);
}
